// 导出数据
const download = (blobData, filename = '导出数据.xlsx',fileOptions = 'vnd.ms-excel') => {
  const fileType = filename.substr(filename.lastIndexOf('.') + 1); // Gets the file suffix name
  const link = document.createElement('a'); // Create an A tag
  let blob = new Blob([blobData])

  // const blob = new Blob([blobData], { type: `application/${fileType}` });
  link.setAttribute('href', window.URL.createObjectURL(blob));
  link.setAttribute('download', filename);
  link.style.visibility = 'hidden';
  document.body.appendChild(link);
  link.click();
  document.body.removeChild(link)
}

export default download
